package com.breakfast.fun.data.entity.user.address;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by yukai on 16/9/15.
 */
public class Building {

    /**
     * total : 62
     * pageTotal : 62
     * data : [{"id":12,"areaName":"台江区-金融街万达","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:31:07","state":0,"builderNum":15,"shopNum":0,"sort":0,"carrierId":3,"carrierName":"特能"},{"id":13,"areaName":"晋安区-福新中路","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:31:27","state":0,"builderNum":14,"shopNum":0,"sort":0,"carrierId":3,"carrierName":"特能"},{"id":14,"areaName":"台江区-五一中路","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:32:43","state":0,"builderNum":47,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":15,"areaName":"台江区-广达路","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:32:55","state":0,"builderNum":21,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":16,"areaName":"台江区-群众路","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:33:07","state":0,"builderNum":7,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":17,"areaName":"台江区-八一七中路","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:33:36","state":0,"builderNum":29,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":19,"areaName":"仓山区-则徐大道","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:34:50","state":0,"builderNum":4,"shopNum":0,"sort":0,"carrierId":12,"carrierName":"榕驿城"},{"id":23,"areaName":"鼓楼区-五四路","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:37:50","state":0,"builderNum":49,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":24,"areaName":"鼓楼区-华林路","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:38:15","state":0,"builderNum":52,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":25,"areaName":"鼓楼区-湖东路","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:38:40","state":0,"builderNum":33,"shopNum":0,"sort":0,"carrierId":13,"carrierName":"乐送自有人员"},{"id":26,"areaName":"鼓楼区-东大路","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:38:56","state":0,"builderNum":13,"shopNum":0,"sort":0,"carrierId":13,"carrierName":"乐送自有人员"},{"id":27,"areaName":"鼓楼区-东街口","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:39:12","state":0,"builderNum":26,"shopNum":0,"sort":0,"carrierId":13,"carrierName":"乐送自有人员"},{"id":28,"areaName":"鼓楼区-杨桥东路","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:39:48","state":0,"builderNum":10,"shopNum":0,"sort":0,"carrierId":13,"carrierName":"乐送自有人员"},{"id":29,"areaName":"鼓楼区-鼓屏路","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:40:00","state":0,"builderNum":11,"shopNum":0,"sort":0,"carrierId":13,"carrierName":"乐送自有人员"},{"id":30,"areaName":"鼓楼区-五一北路","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:40:23","state":0,"builderNum":21,"shopNum":0,"sort":0,"carrierId":13,"carrierName":"乐送自有人员"},{"id":31,"areaName":"鼓楼区-福新路","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:40:50","state":0,"builderNum":5,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":32,"areaName":"鼓楼区-北二环西路","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:41:05","state":0,"builderNum":11,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":34,"areaName":"软件园-A区","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:47:36","state":0,"builderNum":32,"shopNum":0,"sort":0,"carrierId":9,"carrierName":"佳强"},{"id":35,"areaName":"软件园-B区","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:47:38","state":0,"builderNum":24,"shopNum":0,"sort":0,"carrierId":9,"carrierName":"佳强"},{"id":36,"areaName":"软件园-c区","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:48:10","state":0,"builderNum":62,"shopNum":0,"sort":0,"carrierId":9,"carrierName":"佳强"},{"id":37,"areaName":"软件园-D区","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:48:22","state":0,"builderNum":44,"shopNum":0,"sort":0,"carrierId":9,"carrierName":"佳强"},{"id":38,"areaName":"软件园-F区","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:48:43","state":0,"builderNum":10,"shopNum":0,"sort":0,"carrierId":9,"carrierName":"佳强"},{"id":39,"areaName":"软件园-G区","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:48:44","state":0,"builderNum":23,"shopNum":0,"sort":0,"carrierId":9,"carrierName":"佳强"},{"id":40,"areaName":"文山里小区","cityId":1,"cityName":"福州市","addTime":"2016-03-06 14:49:25","state":0,"builderNum":22,"shopNum":0,"sort":0,"carrierId":9,"carrierName":"佳强"},{"id":41,"areaName":"晋安区-长乐北路","cityId":1,"cityName":"福州市","addTime":"2016-03-06 15:57:21","state":0,"builderNum":14,"shopNum":0,"sort":0,"carrierId":3,"carrierName":"特能"},{"id":43,"areaName":"台江区-洋中街道学军路","cityId":1,"cityName":"福州市","addTime":"2016-03-06 16:16:38","state":0,"builderNum":1,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":44,"areaName":"仓山区-山亚创业园","cityId":1,"cityName":"福州市","addTime":"2016-03-10 11:10:23","state":0,"builderNum":1,"shopNum":0,"sort":0,"carrierId":6,"carrierName":"58"},{"id":45,"areaName":"晋安区-五四北","cityId":1,"cityName":"福州市","addTime":"2016-03-10 14:44:21","state":0,"builderNum":15,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":47,"areaName":"台江区-台江路","cityId":1,"cityName":"福州市","addTime":"2016-03-16 15:58:46","state":0,"builderNum":10,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":48,"areaName":"晋安区-火车站","cityId":1,"cityName":"福州市","addTime":"2016-03-24 20:05:36","state":0,"builderNum":6,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":49,"areaName":"晋安区-六一北路（双号）","cityId":1,"cityName":"福州市","addTime":"2016-03-24 20:08:42","state":0,"builderNum":-7,"shopNum":0,"sort":0,"carrierId":13,"carrierName":"乐送自有人员"},{"id":52,"areaName":"鼓楼区-古田路","cityId":1,"cityName":"福州市","addTime":"2016-03-31 10:30:38","state":0,"builderNum":7,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":53,"areaName":"台江区-五一南路","cityId":1,"cityName":"福州市","addTime":"2016-04-01 16:50:42","state":0,"builderNum":21,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":54,"areaName":"晋安区-国货东路","cityId":1,"cityName":"福州市","addTime":"2016-04-05 19:29:17","state":0,"builderNum":-3,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":55,"areaName":"台江区-国货西路","cityId":1,"cityName":"福州市","addTime":"2016-04-05 19:29:35","state":0,"builderNum":6,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":56,"areaName":"晋安区-塔头路","cityId":1,"cityName":"福州市","addTime":"2016-04-06 16:52:15","state":0,"builderNum":10,"shopNum":0,"sort":0,"carrierId":3,"carrierName":"特能"},{"id":57,"areaName":"晋安区-三八路","cityId":1,"cityName":"福州市","addTime":"2016-04-06 17:04:55","state":0,"builderNum":3,"shopNum":0,"sort":0,"carrierId":3,"carrierName":"特能"},{"id":58,"areaName":"晋安区-福马路","cityId":1,"cityName":"福州市","addTime":"2016-04-06 17:29:33","state":0,"builderNum":61,"shopNum":0,"sort":0,"carrierId":3,"carrierName":"特能"},{"id":59,"areaName":"晋安区-前横南路","cityId":1,"cityName":"福州市","addTime":"2016-04-06 17:48:19","state":0,"builderNum":2,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"特能"},{"id":60,"areaName":"台江区-排尾路","cityId":1,"cityName":"福州市","addTime":"2016-04-06 17:53:41","state":0,"builderNum":1,"shopNum":0,"sort":0,"carrierId":3,"carrierName":"特能"},{"id":61,"areaName":"台江区-鳌峰路","cityId":1,"cityName":"福州市","addTime":"2016-04-06 18:03:44","state":0,"builderNum":3,"shopNum":0,"sort":0,"carrierId":3,"carrierName":"特能"},{"id":62,"areaName":"晋安区\u2014连江北路","cityId":1,"cityName":"福州市","addTime":"2016-04-06 20:46:03","state":0,"builderNum":2,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"特能"},{"id":63,"areaName":"晋安区-福新东路","cityId":1,"cityName":"福州市","addTime":"2016-04-06 21:42:30","state":0,"builderNum":16,"shopNum":0,"sort":0,"carrierId":3,"carrierName":"特能"},{"id":65,"areaName":"六一中路单号","cityId":1,"cityName":"福州市","addTime":"2016-04-07 18:05:23","state":0,"builderNum":18,"shopNum":0,"sort":0,"carrierId":13,"carrierName":"乐送自有人员"},{"id":66,"areaName":"六一中路双号","cityId":1,"cityName":"福州市","addTime":"2016-04-07 18:13:54","state":0,"builderNum":21,"shopNum":0,"sort":0,"carrierId":13,"carrierName":"乐送自有人员"},{"id":67,"areaName":"晋安区-远洋路","cityId":1,"cityName":"福州市","addTime":"2016-04-11 11:27:52","state":0,"builderNum":6,"shopNum":0,"sort":0,"carrierId":3,"carrierName":"特能"},{"id":70,"areaName":"仓山区-金山","cityId":1,"cityName":"福州市","addTime":"2016-04-14 12:26:45","state":0,"builderNum":66,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"榕驿城"},{"id":72,"areaName":"鼓楼区-八一七北路","cityId":1,"cityName":"福州市","addTime":"2016-04-15 14:31:33","state":0,"builderNum":15,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":73,"areaName":"鼓楼区-中山路","cityId":1,"cityName":"福州市","addTime":"2016-04-15 15:03:32","state":0,"builderNum":4,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":77,"areaName":"晋安区-连江中路","cityId":1,"cityName":"福州市","addTime":"2016-04-15 16:34:09","state":0,"builderNum":5,"shopNum":0,"sort":0,"carrierId":3,"carrierName":"特能"},{"id":78,"areaName":"晋安区-化工路","cityId":1,"cityName":"福州市","addTime":"2016-04-15 16:34:37","state":0,"builderNum":3,"shopNum":0,"sort":0,"carrierId":3,"carrierName":"特能"},{"id":79,"areaName":"晋安区-前横路","cityId":1,"cityName":"福州市","addTime":"2016-04-15 16:58:05","state":0,"builderNum":6,"shopNum":0,"sort":0,"carrierId":3,"carrierName":"特能"},{"id":81,"areaName":"鼓楼区-东水路","cityId":1,"cityName":"福州市","addTime":"2016-04-21 10:23:59","state":0,"builderNum":6,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":82,"areaName":"鼓楼区-古田支路","cityId":1,"cityName":"福州市","addTime":"2016-04-21 11:25:46","state":0,"builderNum":3,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":83,"areaName":"鼓楼区-工业路","cityId":1,"cityName":"福州市","addTime":"2016-04-21 11:41:05","state":0,"builderNum":1,"shopNum":0,"sort":0,"carrierId":12,"carrierName":"榕驿城"},{"id":84,"areaName":"台江区-交通路","cityId":1,"cityName":"福州市","addTime":"2016-04-21 12:14:34","state":0,"builderNum":9,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":86,"areaName":"鼓楼区-温泉公园路 ","cityId":1,"cityName":"福州市","addTime":"2016-04-21 13:10:30","state":0,"builderNum":4,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":87,"areaName":"鼓楼区-新权南路","cityId":1,"cityName":"福州市","addTime":"2016-04-25 15:16:49","state":0,"builderNum":2,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":88,"areaName":"晋安区-六一北路（单号）","cityId":1,"cityName":"福州市","addTime":"2016-04-25 16:04:13","state":0,"builderNum":10,"shopNum":0,"sort":0,"carrierId":13,"carrierName":"乐送自有人员"},{"id":90,"areaName":"仓山区-上渡路","cityId":1,"cityName":"福州市","addTime":"2016-05-13 16:19:17","state":0,"builderNum":2,"shopNum":0,"sort":0,"carrierId":12,"carrierName":"榕驿城"},{"id":94,"areaName":"鼓楼区-温泉支路","cityId":1,"cityName":"福州市","addTime":"2016-05-19 21:48:57","state":0,"builderNum":3,"shopNum":0,"sort":0,"carrierId":0,"carrierName":"乐送自有人员"},{"id":95,"areaName":"鼓楼区-津泰路","cityId":1,"cityName":"福州市","addTime":"2016-06-24 15:14:04","state":0,"builderNum":1,"shopNum":0,"sort":0,"carrierId":13,"carrierName":"乐送自有人员"}]
     * msg : 查询成功
     * success : true
     */

    private int total;
    private int pageTotal;
    private String msg;
    private boolean success;
    /**
     * id : 12
     * areaName : 台江区-金融街万达
     * cityId : 1
     * cityName : 福州市
     * addTime : 2016-03-06 14:31:07
     * state : 0
     * builderNum : 15
     * shopNum : 0
     * sort : 0
     * carrierId : 3
     * carrierName : 特能
     */

    private List<BuildingData> data;

    public static Building objectFromData(String str) {

        return new Gson().fromJson(str, Building.class);
    }

    public static List<Building> arrayBuildingFromData(String str) {

        Type listType = new TypeToken<ArrayList<Building>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getPageTotal() {
        return pageTotal;
    }

    public void setPageTotal(int pageTotal) {
        this.pageTotal = pageTotal;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public List<BuildingData> getData() {
        return data;
    }

    public void setData(List<BuildingData> data) {
        this.data = data;
    }

}
